//
//  YXAnimatedTransition.h
//  YXImageBrowserDemo
//
//  Created by guo peng huang on 2021/5/18.
//  转场动画管理者

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@protocol YXAnimatedTransitionProtocol <NSObject>
@required


/// 转场动画显示
/// @param container 视图容器
/// @param startView 开始视图
/// @param startImage 开始视图image
/// @param endFrame 结束frame
/// @param orientation 屏幕旋转
/// @param completion 回调
- (void)yx_showTransitioningWithContainer:(UIView *)container startView:(nullable __kindof UIView *)startView startImage:(nullable UIImage *)startImage endFrame:(CGRect)endFrame orientation:(UIDeviceOrientation)orientation completion:(void(^)(void))completion;


/// 隐藏-原路返回视图
/// @param container 视图容器
/// @param startView 开始view
/// @param endView 结束view
/// @param orientation 旋转方向
/// @param completion 回调
- (void)yx_hideTransitioningWithContainer:(UIView *)container startView:(nullable __kindof UIView *)startView endView:(UIView *)endView orientation:(UIDeviceOrientation)orientation completion:(void(^)(void))completion;

@end

typedef NS_ENUM(NSInteger, YXTransitionType) {
    /// 无动效
    YXTransitionTypeNone,
    /// 渐隐
    YXTransitionTypeFade,
    /// 连贯移动
    YXTransitionTypeCoherent
};

@interface YXAnimatedTransition : NSObject <YXAnimatedTransitionProtocol>

/// 入场动效类型
@property (nonatomic, assign) YXTransitionType showType;
/// 出场动效类型
@property (nonatomic, assign) YXTransitionType hideType;

/// 入场动效持续时间
@property (nonatomic, assign) NSTimeInterval showDuration;
/// 出场动效持续时间
@property (nonatomic, assign) NSTimeInterval hideDuration;

@end

NS_ASSUME_NONNULL_END
